package com.scy.controller;

import org.springframework.web.bind.annotation.*;

/**
 * 本类用来演示
 *
 * @author wwh
 * @date 2024/6/25 15:42 $
 */
@RestController
public class RestFulController {

//    @RequestMapping(value = "/user/{id}",method = RequestMethod.DELETE)
    @DeleteMapping("/user/{id}")
    public String del(@PathVariable("id") Integer id){

        System.out.println("删除"+id);
        return id.toString();
    }

    @RequestMapping(value = "/user/{id}",method = RequestMethod.GET)
    public String get(@PathVariable("id") Integer id){

        System.out.println("获得"+id);
        return id.toString();
    }

}
